import com.mysql.jdbc.Statement;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

import weibo4j.org.json.JSONException;
import java.sql.ResultSet;
import network.Config;
public class main {
    public static void main(String[] args) throws JSONException, ClassNotFoundException, InstantiationException, IllegalAccessException, SQLException {
        ResultSet rs=getUidStatus();
        rs.next();
        System.out.println(rs.getString(1));
        
    }
    public static ResultSet getUidStatus() throws SQLException, ClassNotFoundException, InstantiationException, IllegalAccessException {
        String query="SELECT `fid` FROM `wb_demo_status` WHERE `uid`= '"+Config.uid+"';";
        Class.forName("com.mysql.jdbc.Driver").newInstance();
        //建立到MySQL的连接
        Connection conn = (Connection) DriverManager.getConnection("jdbc:mysql://localhost:3306/weibonews?useUnicode=true&characterEncoding=gb2312", "root", "");
        //执行SQL语句
        Statement stmt = (Statement) conn.createStatement();
        ResultSet rs = stmt.executeQuery(query);
        
        return rs;
    }
    
    
}
